/*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "xen_console_decl.h"
#include "xen_crashdump_decl.h"
#include "xen_host_decl.h"
-#include "xen_int_float_map.h"
#include "xen_on_crash_behaviour.h"
#include "xen_on_normal_exit.h"
#include "xen_string_string_map.h"
xen_string_string_map *vcpus_params;
int64_t vcpus_max;
int64_t vcpus_at_startup;
- int64_t vcpus_number;
- xen_int_float_map *vcpus_utilisation;
enum xen_on_normal_exit actions_after_shutdown;
enum xen_on_normal_exit actions_after_reboot;
enum xen_on_crash_behaviour actions_after_crash;
xen_vm_get_vcpus_at_startup(xen_session *session, int64_t *result, xen_vm vm);
-/**
- * Get the VCPUs/number field of the given VM.
- */
-extern bool
-xen_vm_get_vcpus_number(xen_session *session, int64_t *result, xen_vm vm);
-
-
-/**
- * Get the VCPUs/utilisation field of the given VM.
- */
-extern bool
-xen_vm_get_vcpus_utilisation(xen_session *session, xen_int_float_map **result, xen_vm vm);
-
-
/**
* Get the actions/after_shutdown field of the given VM.
*/
/*
- * Copyright (c) 2006, XenSource Inc.
+ * Copyright (c) 2006-2007, XenSource Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "xen_console.h"
#include "xen_crashdump.h"
#include "xen_host.h"
-#include "xen_int_float_map.h"
#include "xen_internal.h"
#include "xen_on_crash_behaviour_internal.h"
#include "xen_on_normal_exit_internal.h"
{ .key = "VCPUs_at_startup",
.type = &abstract_type_int,
.offset = offsetof(xen_vm_record, vcpus_at_startup) },
- { .key = "VCPUs_number",
- .type = &abstract_type_int,
- .offset = offsetof(xen_vm_record, vcpus_number) },
- { .key = "VCPUs_utilisation",
- .type = &abstract_type_int_float_map,
- .offset = offsetof(xen_vm_record, vcpus_utilisation) },
{ .key = "actions_after_shutdown",
.type = &xen_on_normal_exit_abstract_type_,
.offset = offsetof(xen_vm_record, actions_after_shutdown) },
xen_host_record_opt_free(record->resident_on);
free(record->vcpus_policy);
xen_string_string_map_free(record->vcpus_params);
- xen_int_float_map_free(record->vcpus_utilisation);
xen_console_record_opt_set_free(record->consoles);
xen_vif_record_opt_set_free(record->vifs);
xen_vbd_record_opt_set_free(record->vbds);
}
-bool
-xen_vm_get_vcpus_number(xen_session *session, int64_t *result, xen_vm vm)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = vm }
- };
-
- abstract_type result_type = abstract_type_int;
-
- XEN_CALL_("VM.get_VCPUs_number");
- return session->ok;
-}
-
-
-bool
-xen_vm_get_vcpus_utilisation(xen_session *session, xen_int_float_map **result, xen_vm vm)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = vm }
- };
-
- abstract_type result_type = abstract_type_int_float_map;
-
- *result = NULL;
- XEN_CALL_("VM.get_VCPUs_utilisation");
- return session->ok;
-}
-
-
bool
xen_vm_get_actions_after_shutdown(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm)
{